package com.caigou.mapper.cms;

import com.caigou.bean.cms.entity.CollectionConfig;
import com.caigou.bean.cms.entity.CollectionTimeConfig;
import com.caigou.pojo.CollectionList;
import com.caigou.pojo.DictionaryList;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository("CollectionMapper")
public interface CollectionMapper {
    List<CollectionList> loadCollectionList(@Param("title") String title, @Param("status") Integer status);

    List<CollectionTimeConfig> loadCollectionTimeConfigList(@Param("collectionId") Integer collectionId);

    int loadCollectionTimeConfig(@Param("collectionId") Integer collectionId, @Param("time") String time);

    int saveCollectionTimeConfig(CollectionTimeConfig timeConfig);

    int deleteCollectionTimeConfig(@Param("id") Integer id);

    int updateCollectionStatus(@Param("collectionId") Integer collectionId, @Param("collectionStatus") Integer collectionStatus);

    int updateCollectionErrorStatus(@Param("collectionId") Integer collectionId, @Param("collectionErrStatus") Integer collectionErrStatus);

    int updateCollectionErrorConfig(@Param("collectionId") Integer collectionId, @Param("collectionDay") Integer collectionDay, @Param("collectionCount") Integer collectionCount);

    List<DictionaryList> loadCollectionListDictionary();

    int loadCollectionAllCount();

    int loadCollectionErrorCount();

    CollectionConfig loadCollectionConfig(@Param("collectionId") Integer collectionId);
}
